export const CandidateMode = {
    /// <summary>
    /// 任意用户
    /// </summary>
    User: 1,
    /// <summary>
    /// 预选用户
    /// </summary>
    PreUser: 2,
    /// <summary>
    /// 角色
    /// </summary>
    Role: 3,
    /// <summary>
    /// 部门
    /// </summary>
    Department: 4,
    /// <summary>
    /// 触发器
    /// </summary>
    Action: 5,
}


export const candidateModes = [
    { label: "任意用户", value: 1 },
    { label: "预选用户", value: 2 },
    { label: "角色", value: 3 },
    { label: "部门", value: 4 },
    { label: "触发器", value: 5 }
]

export const getCandidateMode = (v: number) => {
    return candidateModes.find((t) => t.value == v);
}